import { request } from "@umijs/max";


export function queryStudentList(body:API.Student_Query_Body) {
  return request<API.StaffInfo>('/student/list', {
    method: 'POST',
    data: body,
  });
}

export function addStudent(body:API.Student_Add_Body) {
  return request<number>('/student/add', {
    method: 'POST',
    data: body,
  });
}

export function updateStudent(body:API.Student_Update_Body) {
  return request<null>('/student/update', {
    method: 'POST',
    data: body,
  });
}
export function assignStudent(body:API.Student_Assign_Body) {
    return request<null>('/student/assignclass',{
        method:'POST',
        data:body
    })
}

//修改存档图片
export function avateUpdate(body:API.Student_AvatarUpdate_Body){
    return request<string>('/student/avatarupdate',{
        method:'POST',
        data:body
    })
}

// 图片预上传
export function avateUpdateload(avatar:FormData){
    return request<string>('/student/avatarupload',{
        method:'POST',
        data:avatar
    })
}

export function classList(){
    return request<API.Student_ClassInfo>('/class/all')
}